Skip to content

Conversation

@askashika
Copy link
Member

What this PR does

  • Adds a reusable isAdmin middleware in server/middlewares/isAdmin.js
  • Checks if the authenticated Clerk user has role: 'admin'
  • Blocks unauthorized users with appropriate status codes
  • Protects contest and question CRUD routes from misuse

Linked Issue

Closes #9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Create an isAdmin middleware. Use the role field from Users Collection

1 participant